package com.yeyks.other.dal.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券基础信息表
 * </p>
 *
 * @author yun
 * @since 2019-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CouponInfoNew对象", description="优惠券基础信息表")
public class CouponInfoNew implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("gmt_create")
    private Date gmtCreate;

    @TableField("gmt_modified")
    private Date gmtModified;

    @ApiModelProperty(value = "券名称")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "所属区域，accountId,适用某区域优惠券")
    @TableField("region_id")
    private Integer regionId;

    @ApiModelProperty(value = "优惠形式：1:指定金额  2：算法生成面值 3:折扣 4:免单")
    @TableField("coupon_type")
    private Integer couponType;

    @ApiModelProperty(value = "面值,根据coupon_type 设置不同值面额或折扣，如果为2，则不填，面值存放到用户领取记录表中，如果为免单则设置为免单上限")
    @TableField("coupon_value")
    private Integer couponValue;

    @ApiModelProperty(value = "选择算法生成时候对应的 算法编码")
    @TableField("calculate_code")
    private String calculateCode;

    @ApiModelProperty(value = "使用门槛：满多少可以使用，单位分，无限制则用0表示")
    @TableField("use_sills")
    private Integer useSills;

    @ApiModelProperty(value = "会员等级为该值时可领取，备用字段")
    @TableField("member_level")
    private Integer memberLevel;

    @ApiModelProperty(value = "活动id，按活动发放优惠券，备用字段")
    @TableField("activity_id")
    private Integer activityId;

    @ApiModelProperty(value = "券生效开始时间")
    @TableField("valid_start")
    private Date validStart;

    @ApiModelProperty(value = "券生效结束时间")
    @TableField("valid_end")
    private Date validEnd;

    @ApiModelProperty(value = "使用说明")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "1初始化，2发行中，3已结束")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "发行量")
    @TableField("total_count")
    private Integer totalCount;

    @ApiModelProperty(value = "每用户最多领取个数")
    @TableField("count_max_user")
    private Integer countMaxUser;

    @ApiModelProperty(value = "已领取个数")
    @TableField("take_count")
    private Integer takeCount;

    @ApiModelProperty(value = "剩余个数")
    @TableField("remain_count")
    private Integer remainCount;

    @ApiModelProperty(value = "操作人ID")
    @TableField("operator_id")
    private Integer operatorId;

    @ApiModelProperty(value = "用户领取券的持续时间")
    @TableField("duration")
    private Integer duration;


    public static final String ID = "id";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFIED = "gmt_modified";

    public static final String TITLE = "title";

    public static final String REGION_ID = "region_id";

    public static final String COUPON_TYPE = "coupon_type";

    public static final String COUPON_VALUE = "coupon_value";

    public static final String CALCULATE_CODE = "calculate_code";

    public static final String USE_SILLS = "use_sills";

    public static final String MEMBER_LEVEL = "member_level";

    public static final String ACTIVITY_ID = "activity_id";

    public static final String VALID_START = "valid_start";

    public static final String VALID_END = "valid_end";

    public static final String REMARK = "remark";

    public static final String STATUS = "status";

    public static final String TOTAL_COUNT = "total_count";

    public static final String COUNT_MAX_USER = "count_max_user";

    public static final String TAKE_COUNT = "take_count";

    public static final String REMAIN_COUNT = "remain_count";

    public static final String OPERATOR_ID = "operator_id";

    public static final String DURATION = "duration";

}
